package com.office.meeting.view.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.office.common.annotation.Log;
import com.office.common.core.controller.BaseController;
import com.office.common.core.domain.AjaxResult;
import com.office.common.enums.BusinessType;
import com.office.meeting.view.domain.ViewMeetingUser;
import com.office.meeting.view.service.IViewMeetingUserService;
import com.office.common.utils.poi.ExcelUtil;
import com.office.common.core.page.TableDataInfo;

/**
 * 参会人员Controller
 * 
 * @author 柒月
 * @date 2025-05-26
 */
@RestController
@RequestMapping("/viewuser/detailed")
public class ViewMeetingUserController extends BaseController
{
    @Autowired
    private IViewMeetingUserService viewMeetingUserService;

    /**
     * 查询参会人员列表
     */
    @PreAuthorize("@ss.hasPermi('viewuser:detailed:list')")
    @GetMapping("/list")
    public TableDataInfo list(ViewMeetingUser viewMeetingUser)
    {
        startPage();
        List<ViewMeetingUser> list = viewMeetingUserService.selectViewMeetingUserList(viewMeetingUser);
        return getDataTable(list);
    }

    /**
     * 导出参会人员列表
     */
    @PreAuthorize("@ss.hasPermi('viewuser:detailed:export')")
    @Log(title = "参会人员", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ViewMeetingUser viewMeetingUser)
    {
        List<ViewMeetingUser> list = viewMeetingUserService.selectViewMeetingUserList(viewMeetingUser);
        ExcelUtil<ViewMeetingUser> util = new ExcelUtil<ViewMeetingUser>(ViewMeetingUser.class);
        util.exportExcel(response, list, "参会人员数据");
    }
}
